<?php

class Webmix_Model_Country extends Core_Model_Item_Abstract {
	public function getWebmix(){
		$webmixTbl = Engine_Api::_()->getDbTable('webmixes', 'webmix');
        $select = $webmixTbl->select()->where('type = ?',Webmix_Model_Webmix::WEBMIX_TYPE_SYSTEM)->where('country_id = ?', $this->getIdentity())->limit(1);
//        echo $select;
//        die;                
		return $webmixTbl->fetchRow($select);
	}
	public function getWebmixId(){
	    
		return $this->getWebmix()->webmix_id;
	}
}